-- GENERATED SPELL FOR [Dragonflayer Spiritualist] --


function spell0_28410(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(51588,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28410', 12000, 1)
end

function spell1_28410(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(51586,pUnit)
pUnit:RegisterEvent('Sorts_28410', 3000, 1)
end

function spell2_28410(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(51587,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28410', 2000, 1)
end

function Sorts_28410(pUnit, Event)
local choix_sorts_28410 = math.random(0, 2)
if choix_sorts_28410 == 0 then
pUnit:RegisterEvent('spell0_28410', 1, 1)
end
if choix_sorts_28410 == 1 then
pUnit:RegisterEvent('spell1_28410', 1, 1)
end
if choix_sorts_28410 == 2 then
pUnit:RegisterEvent('spell2_28410', 1, 1)
end
end

function mob28410_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28410', math.random(1500, 3000), 1)
end

function mob28410_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28410_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28410_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28410, 1, 'mob28410_Action')
RegisterUnitEvent(28410, 2, 'mob28410_Leave')
RegisterUnitEvent(28410, 3, 'mob28410_Kill')
RegisterUnitEvent(28410, 4, 'mob28410_Die')
